require("script/frame/MainFrameInc")
require("script/frame/MsgInc")	
require("script/MainPlayer")

Login = CGuiEntity.new()
local startID = 1
local exitID = 2
local labelID = 3
function Login:msgProcess(msgId, id)
	if EGameMessage.LMouseDown == msgId then

	elseif EGameMessage.LMouseUp == msgId then 
		print("id = "..id)
		if id == startID then
			Login:setVisible(false)	
			gotoScene("resource/Scene/GameApp", true)
			MainPlayerInit()
		elseif id == exitID then
			MainPlayerUnInit()
			exitGame()
		end
	end
	return 0
end


function Login:init()
	Login:setLuaEntityName("Login")
	Login:initialise("resource/Gui/LoginWnd.gui")
	Login:setVisible(true)
	Login:setChildText(3, "T")
end

Login:init()
return Login

